﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace Kale.Core.Configuration
{
   /// <summary>
   /// Represents the configuration for a generalsed argument.
   /// </summary>
   public class ArgumentElement : ConfigurationElement
   {
      /// <summary>
      /// Initializes a new instance of the <see cref="ArgumentElement"/> class.
      /// </summary>
      /// <param name="name">The name.</param>
      /// <param name="value">The value.</param>
      public ArgumentElement(string name, string value)
      {
         this["name"] = name;
         this["value"] = value;
      }

      /// <summary>
      /// Gets or sets the argument name.
      /// </summary>
      /// <value>The argument name.</value>
      [ConfigurationProperty("name", IsRequired = true)]
      public string Name
      {
         get { return (string)this["name"]; }
         set { this["name"] = value; }
      }

      /// <summary>
      /// Gets or sets the argument value.
      /// </summary>
      /// <value>The argument value.</value>
      [ConfigurationProperty("value", IsRequired = true)]
      public string Value
      {
         get { return (string)this["value"]; }
         set { this["value"] = value; }
      }
   }
}
